import java.io.IOException;
import java.net.ServerSocket;
import java.util.HashMap;

public class TCPTest1 extends TCPServerSuperPlus{
    private ServerSocket listenSocket = null;
    HashMap<String,String> hashMap = new HashMap<>();
    public TCPTest1(int pork) throws IOException {
        super(pork);
        hashMap.put("hello","你好");
        hashMap.put("TMD","统一台湾");
        hashMap.put("DFCH","东风伺候");
    }
    @Override
    public String responseFun(String request){
        return hashMap.getOrDefault(request,"不存在");
    }

    public static void main(String[] args) throws IOException {
        TCPTest1 tcpTest1 = new TCPTest1(9999);
        tcpTest1.start();

    }
}
